<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Refresh" content="10">
<title>JavaScript学习</title>
	<script>
		/*--window.alert()弹出警告框、document.write()方法将内容写到HTML文档中、使用innerHTML写入到HTML元素、使用console.log()写入到浏览器的控制台*/
//		window.alert(5+9);
	</script>
</head>

<body>
	<p id="demo2"></p>
	
	<p id="demo1"></p>
	<script>
		var i;
		var cars=new Array();
		cars[0]="sasb";
		cars[1]="valo";
		cars[2]="bmv";
		for(i=0;i<cars.length;i++)
			{
				document.write(cars[i]+"<br>");
			}
		//var x=5;
//		var y=6;
//		var z=x+y;
//		document.write(x+"<br>");
//		document.write(y+"<br>");
//		document.write(z+"<br>");
		/*document.getElementById("demo2").innerHTML='john doe';*/
//		document.getElementById("demo2").innerHTML=5*10;
		/*document.getElementById("demo1").innerHTML=123456;*/
	</script>
</body>
</html>
